LOCAL_PATH := $(call my-dir)

# ====================================================================
# libiap2CPP
# ====================================================================
include $(CLEAR_VARS)
LOCAL_MODULE := libiap2CPP

LOCAL_MODULE_TAGS := optional
LOCAL_JACK_ENABLED := disabled


LOCAL_C_INCLUDES := \
    $(LOCAL_PATH)/include \
    $(LOCAL_PATH)/include/util \
    $(LOCAL_PATH)/linux \
	$(LOCAL_PATH)/../ACPCP_R16E14/Examples \
	$(LOCAL_PATH)/../ACPCP_R16E14/AccessorySDK/Support \

LOCAL_SRC_FILES := \
	src/CIap2Sqlite.cpp \
	src/CIpodConfig.cpp \
	src/CIpodEvent.cpp \
	src/CIpodIap2.cpp \
	src/CIpodLibWrapper.cpp \
	src/CIpodLog.cpp      \
	src/CIpodProtocol.cpp   \
	src/CIpodVehicle.cpp   \
	src/CIpodChip.cpp    \
	src/CIpodDevice.cpp  \
	src/CIpodIap1.cpp   \
	src/CIpodLib.cpp   \
	src/CIpodList.cpp   \
	src/CIpodNative.cpp  \
	src/CIpodSync.cpp     \
	src/util/CStrTool.cpp  \
	src/util/pinyin.c  \
	src/util/rgbtobmp.c \
	../ACPCP_R16E14/Examples/CarPlayInterface.c
#	D:/project/CarPlay/EZLinkProtocl/carplay/ACPCP_R16E14/Examples/CarPlayInterface.c

#$(warning $(LOCAL_SRC_FILES))

LOCAL_CFLAGS := \
    -DBUILD_FOR_ANDROID \
    -Wno-error=date-time \
    -Wno-error=int-conversion \
    -DFRAMEWORK_STYLE_INCLUDES=0 \

LOCAL_LDFLAGS := -Wl

LOCAL_LDLIBS := -llog
APP_ALLOW_MISSING_DEPS := true

LOCAL_SHARED_LIBRARIES := \
    libCoreUtils \

include $(BUILD_SHARED_LIBRARY)

# ====================================================================
# For ipod_audio_stub
# ====================================================================
# include $(CLEAR_VARS)

# LOCAL_MODULE := ipod_audio_stub_android
# LOCAL_MODULE_TAGS := debug optional eng

# LOCAL_C_INCLUDES := \
#     $(JNI_H_INCLUDE) \
#     external/tinyalsa/include \
#     external/libipod/ipod_audio_stub_android \

# LOCAL_SRC_FILES := \
#     ipod_audio_stub_android/main.cpp \

# LOCAL_SHARED_LIBRARIES := \
#     libcutils \
#     libutils \
#     libmedia \
#     liblog \
#     libdl	\
#     libtinyalsa \
#      libaudioutils \
#      libdl \
#      liblog \
#      libmedia \

#include $(BUILD_EXECUTABLE)

# ====================================================================
# For testing
# ====================================================================
# include $(CLEAR_VARS)
# LOCAL_MODULE := libipod_test
# LOCAL_MODULE_TAGS := debug

# LOCAL_C_INCLUDES:= external/libipod/include
# LOCAL_SRC_FILES:= test/libipod_test.c
# LOCAL_SHARED_LIBRARIES:= libipod
# include $(BUILD_EXECUTABLE)

# ====================================================================
# For testing
# ====================================================================
# include $(CLEAR_VARS)
# LOCAL_MODULE := libipod_test
# LOCAL_MODULE_TAGS := debug

# LOCAL_C_INCLUDES:= external/libipod/include
# LOCAL_SRC_FILES:= \
#     test/libipod_test.c \
#     test/EnumIphoneInterface.c \

# LOCAL_C_INCLUDES := $(LOCAL_PATH)/test \
#     $(LOCAL_PATH)/include \
#     external/libusb/libusb \

# LOCAL_SHARED_LIBRARIES:= \
#      libipod-iap2 \
#      libusb \

# include $(BUILD_EXECUTABLE)
